<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //Rest参数与spread扩展运算符在ES6中已经引入，不过ES6只针对数组
        // 在ES9中为对象提供了像数组一样的Rest参数和扩展运算符

        function content({host,port,...user}){
            console.log(host);
            console.log(port);
            console.log(user);
        }

        content({
            host:'127.0.0.1',
            port:3306,
            username:'root',
            password:'root',
            type:'master'
        });

        const skillOne = {
            q:'天音波'
        }
        const skillTwo = {
            w:'金钟罩'
        }
        const skillThree = {
            e:'天雷破'
        }
        const skillFour = {
            r:'猛龙摆尾'
        }

        const mangseng ={...skillFour,...skillOne,...skillThree,...skillTwo};
        console.log(mangseng);




    </script>
</body>
</html>